Skip to content

ARROW-632: [Python] Add support for FixedWidthBinary type - #461

Closed
cpcloud wants to merge 1 commit into
apache:masterfrom
cpcloud:ARROW-632
Closed

cpcloud wants to merge 1 commit into
apache:masterfrom
cpcloud:ARROW-632

Conversation

@cpcloud

@cpcloud cpcloud commented Mar 30, 2017

Copy link
Copy Markdown
Contributor

No description provided.

@wesm wesm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, looks good modulo minor c++ nits

Comment thread cpp/src/arrow/python/builtin_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you include this as `"arrow/util/logging.h" with the other arrow includes? https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread cpp/src/arrow/python/builtin_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about putting this in

https://github.com/apache/arrow/blob/master/cpp/src/arrow/python/config.cc#L25

Init() gets calls when you import pyarrow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread cpp/src/arrow/python/builtin_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread cpp/src/arrow/python/pandas_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google C++ recommends putting mutable args after input args, and making them pointers, e.g. (..., FooBuilder* sink)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was following the conventions of AppendObjectStrings. I'll change both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread cpp/src/arrow/python/pandas_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make null_bytes here int64_t

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread cpp/src/arrow/python/pandas_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread cpp/src/arrow/python/pandas_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int64_t (BytesForBits returns this)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread cpp/src/arrow/python/pandas_convert.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could put this in in a little function that also does DCHECK_EQ(Type::FIXED_WIDTH_BINARY, arr->type_enum())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using DCHECK_EQ, but it aborts which doesn't let us show the user what went wrong.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can pipe a message into DCHECK -- DCHECK should only be used for "can't fail" errors (made by developers) though, anything else should return a proper error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm this is definitely a user facing error, since we're dealing with user input here.

@wesm

wesm commented Mar 30, 2017

Copy link
Copy Markdown
Member

Can you touch the branch to trigger a CI build (now that the Parquet stuff is hopefully fixed)?

@cpcloud

cpcloud commented Mar 30, 2017

Copy link
Copy Markdown
Contributor Author

Yep.

@cpcloud

cpcloud commented Mar 30, 2017

Copy link
Copy Markdown
Contributor Author

Green on travis, w00t.

@cpcloud

cpcloud commented Mar 30, 2017

Copy link
Copy Markdown
Contributor Author

rebasing now

@wesm wesm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. thank you for the contribution!

@asfgit asfgit closed this in 4915ecf Mar 30, 2017
@cpcloud
cpcloud deleted the ARROW-632 branch March 31, 2017 17:01
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 8, 2018
…tics

Prevent the function FormatStatValue from adding a trailing space
to the formatted statistics of strings and int96.

Author: Julius Neuffer <julius.neuffer@blue-yonder.com>

Closes apache#461 from jneuff/remove-trailing-space and squashes the following commits:

612e24c [Julius Neuffer] PARQUET-1283: [C++] Remove trailing space for string and int96 statistics

Change-Id: I8b1e40fe544b49f731129623b411c21091dbfe87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants